package io.renren.modules.gengyun.service.impl;

import io.renren.modules.gengyun.dao.PlanIndicatorDao;
import io.renren.modules.gengyun.entity.PlanIndicatorEntity;
import io.renren.modules.gengyun.service.PlanIndicatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PlanIndicatorServiceImpl implements PlanIndicatorService {

    @Autowired
    private PlanIndicatorDao indicatorDao;


    @Override
    public PlanIndicatorEntity getIndicator(Long id) {
        return indicatorDao.getIndicator(id);
    }

    @Override
    public int save(PlanIndicatorEntity indicator) {
        return indicatorDao.save(indicator);
    }

    @Override
    public int update(PlanIndicatorEntity indicator) {
        return indicatorDao.update(indicator);
    }

    @Override
    public int delete(Long id) {
        return indicatorDao.deleteById(id);
    }

    @Override
    public List<Map<String, Object>> allList() {
        return indicatorDao.allList();
    }

    @Override
    public PlanIndicatorEntity getIndicatorByName(String name) {
        return indicatorDao.getIndicatorByName(name);
    }
}
